home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
swagd_f.zip
/
DIRS.SWG
/
0031_Recursing ALL Dirs.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-08-24
|
581b
|
26 lines
uses dos;
procedure ProcessAllFiles(dir : dirstr);
var
d : searchrec;
begin
while (dir[length(dir)] = '\') do dec(dir[0]);
{ this gets the files }
findfirst(dir+'\*.*',anyfile+hidden+system+readonly,d);
while (doserror = 0) do begin
process(d.name);
findnext(d);
end;
{ this gets the subs, recursively }
findfirst(dir+'\*.*',directory,d);
while (doserror = 0) do begin
if (d.attr and directory = directory) then
ProcessAllFiles(dir+'\'+d.name);
findnext(d);
end;
end;